package equals_.hashcode_;

public class HashCode_ {
    public static void main(String[] args) {
        A a = new A();
        A a1 = new A();
        A a2 = a;//让a2也指向a1
        System.out.println(a.hashCode());//将地址转换成整数
        System.out.println(a1.hashCode());
        System.out.println(a2.hashCode());//与a的哈希值同
    }

}
class A{}
